﻿using WeDonekRpc.Helper.Validate;

namespace Basic.FormRemoteModel.Table.Model
{
    public class TableSet
    {
        /// <summary>
        /// 列表行自动生成方式
        /// </summary>
        [EnumValidate("form.table.row.generate.mode.error", typeof(TableRowGenerateMode))]
        public TableRowGenerateMode RowGenerateMode { get; set; }

        /// <summary>
        /// 表ID
        /// </summary>
        public long? TableId { get; set; }
        /// <summary>
        /// 自动生成的列
        /// </summary>
        public string GenerateCol { get; set; }

        /// <summary>
        /// 固定行数
        /// </summary>
        public int? FixedRowNum { get; set; }
        /// <summary>
        /// 每组数据填充的行数
        /// </summary>
        public int? FillRowNum { get; set; }

        /// <summary>
        /// 填充列和值(和FillRowNum配合使用)
        /// </summary>
        public Dictionary<string, string>[] FillColumn { get; set; }
        /// <summary>
        /// 是否分页
        /// </summary>
        public bool IsPaging { get; set; }

        /// <summary>
        /// 每页行数
        /// </summary>
        public int? PageSize { get; set; }

        /// <summary>
        /// 是否行验证
        /// </summary>
        public bool IsRowCheck { get; set; }

        /// <summary>
        /// 是否显示序号
        /// </summary>
        public bool IsShowNo { get; set; }
    }
}
